<style>
    .radio-input div{
        float: left;
        margin-left: .5em;
    }
</style>
<?php
if(isset($form['#upgrade_user'])&& !empty($form['#upgrade_user'])) {
    print _user_base_header_info();
}
?>
<?php
    if(arg(1) == 'edit' && !empty($_GET['distributor_id'])){
        echo get_template_header_info(arg(2),'distributor');
    }
?>
<div class="hp-tab-newprd">
    <ul class="j-sw-nav">
    <?php
         if(arg(1) == 'add'){?>
            <li class="newprd-s1 tab-li"><a href="<?php echo base_path();?>distributor/list">查看</a></li>
            <li class="newprd-s2 tab-li on"><a href="<?php echo base_path();?>distributor/add">添加</a></li>
        <?php }else if(arg(1) == 'edit' && !empty($_GET['distributor_id'])){?>
            <?php echo get_tab(arg(2),'distributor','distributor')?>
        <?php }else if( arg(1) == 'edit' && empty($_GET['distributor_id']) && empty($_GET['upgrade_id'])){?>
            <li class="newprd-s1 tab-li"><a href="<?php echo base_path();?>distributor/list">查看</a></li>
            <?php if(user_access('add distributor')){ ?>
            <li class="newprd-s2 tab-li"><a href="<?php echo base_path();?>distributor/add">添加</a></li>
            <?php }?>
            <li class="newprd-s3 tab-li on"><a href="javascript:void(0)">修改</a></li>
        <?php }?>
    </ul>
        <div class="newprd-s1">
            <div class="table-div">
                <div class="max-big-input" style="clear:both">
                    <div class="form-label"><span class="required">*</span>经销商名称:</div><?php print render($form['distributor']['name']); ?>
                </div>
                <?php  print _address_render_for_add($form)?>
                <div class="small-select small-input column" style="clear:both">
                    <div class="small-input max-big-input"><div class="form-label"><span class="required">*</span>详细地址:</div><?php print render($form['distributor']['details']); ?></div>

                </div>
                <div class="small-div"><div class="form-label">关内/关外:</div><div class="radio-input"><?php print render($form['distributor']['inorout']); ?></div></div>
                <div class="small-select small-input column" style="clear:both">
                    <div class="small-div"><div class="form-label">电话号码:<br/>(如：010-1234567)</div><?php print render($form['distributor']['phone']); ?></div>
                    <div class="small-div"><div class="form-label"><span class="required">*</span>手机号码:</div><?php print render($form['distributor']['cell']); ?></div>
                    <div class="small-div"><div class="form-label">电子邮件:</div><?php print render($form['distributor']['email']); ?></div>
                    <div class="small-div" style="clear: both"><div class="form-label">上级经销商:</div><?php print render($form['distributor_work']['parent']); ?></div>
                </div>
                <div class="small-select small-input column" style="clear:both">
                    <div class="form-label">备注信息:</div><div style="margin-left: 11.3em; "><?php print render($form['distributor_other']['comments']); ?></div>
                </div>
                <div class="add-submit" style="text-align: center"><?php print render($form['submit']); ?></div>
        </div>
    </div>
</div>

<?php print drupal_render_children($form); ?>